<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>运算符</title>
</head>

<body>

</body>
<script>
    // 字符串相关运算
    // 字符串类型数字进行运算，会自动类型转换
    let num = "10";
    document.write(num + 5 + "<br/>");    // 105
    document.write(num + "5" + "<br/>");  // 105
    document.write(num - 5 + "<br/>");    // 5
    document.write(num * 5 + "<br/>");    // 50

    //  == 和 === 
    let num2 = 10;
    document.write(num == num2);  // true  == 只比较值是否相同
    document.write(num === num2); // false  比较数据类型和值

</script>

</html>